//=============================================================================

#ifndef AOBJECT_H
  #define AOBJECT_H

//=============================================================================

#include "aModel.h"
#include "aVector.h"
#include "aForce.h"

//=============================================================================

#define OT_STATIC 1
#define OT_SOLID 2
#define OT_SPRINGY_REG 4
#define OT_SPRINGY_NOTREG 8

//=============================================================================

class aObject
{
  public:
    inline void aoApplyForce(const aVector& from, const aForce& f)  {force += f; model.amGetHit(from, f);}
    inline float aoGetMass()                                        {return mass;}
    inline void aoDrawObject()                                      {model.asDrawSurface();}

    aObject();
      void aoPhysicalProcess();
      bool aoHaveCollision(const aObject& obj);
      void aoRemoveObject();
      void aoCloneObject(const aObject& obj);
    virtual ~aObject();

  public:
    aVector pos;
    unsigned int physType;
    unsigned long id;

    aModel model;
  protected:
    aForce force;
    aVector velocity;
    float mass;
};

//=============================================================================

#endif

//=============================================================================
